function fOnChange(y,m,d)
{
	fFormatDate(y,m,d);
}

function fAfterSelected(y,m,d)
{}

// ====== Following are self-defined and/or custom-built functions! =======
var _dc, _mc, _yc;
function fshowCalendar(dc)
{
  var range='';
  fPopCalendar(dc, range, "toggle");
}

function fshowCalendar1(valueDate,dc)
{
  var range='';
  _fPopCalendar(valueDate,dc, range, "toggle");
}

function fhideCalendar()
{
	fHideCal();
}

function fshowCellCalendar(dc, x, y, obj)
{
  var range='';
  fPopCellCalendar(dc, range, "toggle", x, y, obj);
}

// Tools
var gDateCtrlClick = false;
function fCloseCalendarCtrl() {
    if (gDateCtrlClick) {
        gDateCtrlClick = false; 
        return;
    }     
    if (!gDateCtrlClick) {
        fhideCalendar();
    }
}

function fShowCalendarCtrl(ctrl,x,y) {
    gDateCtrlClick = true;    
    fshowCellCalendar(ctrl, x-10, y-10);    
}